package vista;

import java.awt.Graphics;
import java.awt.Image;

import javax.swing.ImageIcon;
import javax.swing.JPanel;

@SuppressWarnings("serial")
public class VistaShadow extends JPanel{
		
	    private ImageIcon sombra1 = new ImageIcon(getClass().getResource("/imagenes/vehiculos/shadow.png"));
		private ImageIcon sombra2 = new ImageIcon(getClass().getResource("/imagenes/vehiculos/shadow2.png"));
		private Image shadow = sombra1.getImage();
		private int posX, posY;
			
		public VistaShadow(int dim){
			posX = -770+ (2*dim)-dim+(dim*2/25);
			posY = -800+ (2*dim)-dim+(dim*29/100);
			if (dim < 50)
				shadow = sombra2.getImage();
			setSize(1600,1600);
			this.setLocation(posX,posY);
		}
		
		protected void paintComponent(Graphics g){
			g.drawImage(shadow, 0, 0, 1600, 1600, this);
		}
	
}